<?php

use yii\helpers\Html;
use yii\helpers\ArrayHelper;
use yii\widgets\ActiveForm;
use kartik\datetime\DateTimePicker;

/* @var $this yii\web\View */
/* @var $model common\models\UserDrugWarehouse */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="user-drug-warehouse-form">

    <?php $form = ActiveForm::begin(); ?>

    <?php
        echo $form->field($model,'user_id')->dropDownList(ArrayHelper::map($userlist,'id','name'));
    ?>
    <?php
        echo $form->field($model,'user_drug_id')->dropDownList(ArrayHelper::map($userdruglist,'id','name'));
    ?>
    <?php
        echo $form->field($model,'user_supplier_id')->dropDownList(ArrayHelper::map($usersupplier,'id','name'));
    ?>
    <?= $form->field($model, 'num')->textInput() ?>

    <?= $form->field($model, 'in_price')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'out_price')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'vip_price')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'product_coding')->textInput() ?>


    <?= $form->field($model, 'produce_time')->widget(DateTimePicker::classname(), [
        'options' => ['placeholder' => ''],
        'pluginOptions' => [
            'autoclose' => true
        ]
    ]);
    ?>

    <?= $form->field($model, 'expired_time')->widget(DateTimePicker::classname(), [
        'options' => ['placeholder' => ''],
        'pluginOptions' => [
            'autoclose' => true
        ]
    ]);
    ?>

    <?php
        $arr = [['id'=>0, 'name'=>"隐藏",], ['id'=>1,'name'=>"显示"],
        ];
        echo $form->field($model,'status')->dropDownList(ArrayHelper::map($arr,'id','name'));
    ?>

    <div class="form-group">
        <?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
